function [ b ] = isdebug( )
% Check debug mode
%   Return 1 only if global variables 'Debug' or 'fullDebug' is set to 1.

global Debug fullDebug

if ((exist('Debug','var') && Debug == 1) || ...
    (exist('fullDebug','var') && fullDebug == 1))
    b = 1;
else
    b = 0;
end

